package com.asiainfo.os;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
 * 
 * @author xw.jiang
 * @date 2016-06-20
 * @description 系统过滤器
 *
 */
public class SystemFilter implements Filter{

	@Override
	public void destroy() {
		System.out.println("destroy...");
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		System.out.println("doFilter...");
		chain.doFilter(request, response);//放行。让其走到下个链或目标资源中
	}

	@Override
	public void init(FilterConfig arg0) throws ServletException {
		System.out.println("init...");
	}

}
